using System;
using System.Data;
using System.Collections;

namespace APP.QUANLY.Entity
{
     /// <summary>
     /// Summary description for NHANVIEN.
     /// </summary>
     public class NHANVIEN
    {
              private Int32 _MANHANVIEN;
      private Int32 _MALOAI;
      private string _TENNHANVIEN;
      private string _CHUCVU;
      private DateTime _NGAYSINH;
      private string _GIOITINH;
      private string _CMND;
      private string _DIACHI;
      private string _QUEQUAN;
      private string _DIDONG;
      private decimal _LUONGCOBAN;
      private string _EMAIL;
      private bool _THEODOI;
      private DateTime _NGAYTAO;
      private string _NGUOITAO;
      private DateTime _NGAYCAPNHAT;
      private string _NGUOICAPNHAT;
      private bool _ISDELETE;
      private CAList _listCA;
        private bool isExisting;
        #region Properties
        public bool IsExisting
        {
              get{return isExisting;}
              set{isExisting = value;}
        }
		      public bool IsMANHANVIENNullable
      { get { return false;  } }
      public Int32 MANHANVIEN
      {
         get { return _MANHANVIEN; }
         set { _MANHANVIEN = value; }
      }
      public bool IsMALOAINullable
      { get { return true;  } }
      public Int32 MALOAI
      {
         get { return _MALOAI;  }
         set { _MALOAI = value; }
      }
      public bool IsTENNHANVIENNullable
      { get { return true;  } }
      public string TENNHANVIEN
      {
         get { return _TENNHANVIEN;  }
         set { _TENNHANVIEN = value; }
      }
      public bool IsCHUCVUNullable
      { get { return true;  } }
      public string CHUCVU
      {
         get { return _CHUCVU;  }
         set { _CHUCVU = value; }
      }
      public bool IsNGAYSINHNullable
      { get { return true;  } }
      public DateTime NGAYSINH
      {
         get { return _NGAYSINH;  }
         set { _NGAYSINH = value; }
      }
      public bool IsGIOITINHNullable
      { get { return true;  } }
      public string GIOITINH
      {
         get { return _GIOITINH;  }
         set { _GIOITINH = value; }
      }
      public bool IsCMNDNullable
      { get { return true;  } }
      public string CMND
      {
         get { return _CMND;  }
         set { _CMND = value; }
      }
      public bool IsDIACHINullable
      { get { return true;  } }
      public string DIACHI
      {
         get { return _DIACHI;  }
         set { _DIACHI = value; }
      }
      public bool IsQUEQUANNullable
      { get { return true;  } }
      public string QUEQUAN
      {
         get { return _QUEQUAN;  }
         set { _QUEQUAN = value; }
      }
      public bool IsDIDONGNullable
      { get { return true;  } }
      public string DIDONG
      {
         get { return _DIDONG;  }
         set { _DIDONG = value; }
      }
      public bool IsLUONGCOBANNullable
      { get { return true;  } }
      public decimal LUONGCOBAN
      {
         get { return _LUONGCOBAN;  }
         set { _LUONGCOBAN = value; }
      }
      public bool IsEMAILNullable
      { get { return true;  } }
      public string EMAIL
      {
         get { return _EMAIL;  }
         set { _EMAIL = value; }
      }
      public bool IsTHEODOINullable
      { get { return true;  } }
      public bool THEODOI
      {
         get { return _THEODOI;  }
         set { _THEODOI = value; }
      }
      public bool IsNGAYTAONullable
      { get { return true;  } }
      public DateTime NGAYTAO
      {
         get { return _NGAYTAO;  }
         set { _NGAYTAO = value; }
      }
      public bool IsNGUOITAONullable
      { get { return true;  } }
      public string NGUOITAO
      {
         get { return _NGUOITAO;  }
         set { _NGUOITAO = value; }
      }
      public bool IsNGAYCAPNHATNullable
      { get { return true;  } }
      public DateTime NGAYCAPNHAT
      {
         get { return _NGAYCAPNHAT;  }
         set { _NGAYCAPNHAT = value; }
      }
      public bool IsNGUOICAPNHATNullable
      { get { return true;  } }
      public string NGUOICAPNHAT
      {
         get { return _NGUOICAPNHAT;  }
         set { _NGUOICAPNHAT = value; }
      }
      public bool IsISDELETENullable
      { get { return true;  } }
      public bool ISDELETE
      {
         get { return _ISDELETE;  }
         set { _ISDELETE = value; }
      }
public CAList CAList 
{ 
	get { return _listCA; }
	set { _listCA = value;}
}

        #endregion

        #region Constructors
        public NHANVIEN()
        {
            Reset();
        }
        public NHANVIEN(NHANVIEN obj)
        {
            	this._MANHANVIEN = obj.MANHANVIEN;
	this._MALOAI = obj.MALOAI;
	this._TENNHANVIEN = obj.TENNHANVIEN;
	this._CHUCVU = obj.CHUCVU;
	this._NGAYSINH = obj.NGAYSINH;
	this._GIOITINH = obj.GIOITINH;
	this._CMND = obj.CMND;
	this._DIACHI = obj.DIACHI;
	this._QUEQUAN = obj.QUEQUAN;
	this._DIDONG = obj.DIDONG;
	this._LUONGCOBAN = obj.LUONGCOBAN;
	this._EMAIL = obj.EMAIL;
	this._THEODOI = obj.THEODOI;
	this._NGAYTAO = obj.NGAYTAO;
	this._NGUOITAO = obj.NGUOITAO;
	this._NGAYCAPNHAT = obj.NGAYCAPNHAT;
	this._NGUOICAPNHAT = obj.NGUOICAPNHAT;
	this._ISDELETE = obj.ISDELETE;
        }
        #endregion

        public void Reset()
        {
                     _MANHANVIEN = EmptyValues.v_Int32;
         _MALOAI = EmptyValues.v_Int32;
         _TENNHANVIEN = EmptyValues.v_string;
         _CHUCVU = EmptyValues.v_string;
         _NGAYSINH = EmptyValues.v_DateTime;
         _GIOITINH = EmptyValues.v_string;
         _CMND = EmptyValues.v_string;
         _DIACHI = EmptyValues.v_string;
         _QUEQUAN = EmptyValues.v_string;
         _DIDONG = EmptyValues.v_string;
         _LUONGCOBAN = EmptyValues.v_decimal;
         _EMAIL = EmptyValues.v_string;
         _THEODOI = EmptyValues.v_bool;
         _NGAYTAO = EmptyValues.v_DateTime;
         _NGUOITAO = EmptyValues.v_string;
         _NGAYCAPNHAT = EmptyValues.v_DateTime;
         _NGUOICAPNHAT = EmptyValues.v_string;
         _ISDELETE = EmptyValues.v_bool;
	_listCA = null;
        }

         
        #region Hidden

        /*
        private void readProperties(IDataReader reader)
        {
            try
            {
                                if(!(reader["MANHANVIEN"] is DBNull))
		{
			obj.MANHANVIEN = (Int32)reader["MANHANVIEN"];
		}
                if(!(reader["MALOAI"] is DBNull))
		{
			obj.MALOAI = (Int32)reader["MALOAI"];
		}
                if(!(reader["TENNHANVIEN"] is DBNull))
		{
			obj.TENNHANVIEN = (string)reader["TENNHANVIEN"];
		}
                if(!(reader["CHUCVU"] is DBNull))
		{
			obj.CHUCVU = (string)reader["CHUCVU"];
		}
                if(!(reader["NGAYSINH"] is DBNull))
		{
			obj.NGAYSINH = (DateTime)reader["NGAYSINH"];
		}
                if(!(reader["GIOITINH"] is DBNull))
		{
			obj.GIOITINH = (string)reader["GIOITINH"];
		}
                if(!(reader["CMND"] is DBNull))
		{
			obj.CMND = (string)reader["CMND"];
		}
                if(!(reader["DIACHI"] is DBNull))
		{
			obj.DIACHI = (string)reader["DIACHI"];
		}
                if(!(reader["QUEQUAN"] is DBNull))
		{
			obj.QUEQUAN = (string)reader["QUEQUAN"];
		}
                if(!(reader["DIDONG"] is DBNull))
		{
			obj.DIDONG = (string)reader["DIDONG"];
		}
                if(!(reader["LUONGCOBAN"] is DBNull))
		{
			obj.LUONGCOBAN = (decimal)reader["LUONGCOBAN"];
		}
                if(!(reader["EMAIL"] is DBNull))
		{
			obj.EMAIL = (string)reader["EMAIL"];
		}
                if(!(reader["THEODOI"] is DBNull))
		{
			obj.THEODOI = (bool)reader["THEODOI"];
		}
                if(!(reader["NGAYTAO"] is DBNull))
		{
			obj.NGAYTAO = (DateTime)reader["NGAYTAO"];
		}
                if(!(reader["NGUOITAO"] is DBNull))
		{
			obj.NGUOITAO = (string)reader["NGUOITAO"];
		}
                if(!(reader["NGAYCAPNHAT"] is DBNull))
		{
			obj.NGAYCAPNHAT = (DateTime)reader["NGAYCAPNHAT"];
		}
                if(!(reader["NGUOICAPNHAT"] is DBNull))
		{
			obj.NGUOICAPNHAT = (string)reader["NGUOICAPNHAT"];
		}
                if(!(reader["ISDELETE"] is DBNull))
		{
			obj.ISDELETE = (bool)reader["ISDELETE"];
		}
//            _MANHANVIEN = (reader["MANHANVIEN"] is DBNull)?DalTools.EmptyValues.v_Int32:(Int32)reader["MANHANVIEN"];
//            _MALOAI = (reader["MALOAI"] is DBNull)?DalTools.EmptyValues.v_Int32:(Int32)reader["MALOAI"];
//            _TENNHANVIEN = (reader["TENNHANVIEN"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["TENNHANVIEN"];
//            _CHUCVU = (reader["CHUCVU"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["CHUCVU"];
//            _NGAYSINH = (reader["NGAYSINH"] is DBNull)?DalTools.EmptyValues.v_DateTime:(DateTime)reader["NGAYSINH"];
//            _GIOITINH = (reader["GIOITINH"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["GIOITINH"];
//            _CMND = (reader["CMND"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["CMND"];
//            _DIACHI = (reader["DIACHI"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["DIACHI"];
//            _QUEQUAN = (reader["QUEQUAN"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["QUEQUAN"];
//            _DIDONG = (reader["DIDONG"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["DIDONG"];
//            _LUONGCOBAN = (reader["LUONGCOBAN"] is DBNull)?DalTools.EmptyValues.v_decimal:(decimal)reader["LUONGCOBAN"];
//            _EMAIL = (reader["EMAIL"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["EMAIL"];
//            _THEODOI = (reader["THEODOI"] is DBNull)?DalTools.EmptyValues.v_bool:(bool)reader["THEODOI"];
//            _NGAYTAO = (reader["NGAYTAO"] is DBNull)?DalTools.EmptyValues.v_DateTime:(DateTime)reader["NGAYTAO"];
//            _NGUOITAO = (reader["NGUOITAO"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["NGUOITAO"];
//            _NGAYCAPNHAT = (reader["NGAYCAPNHAT"] is DBNull)?DalTools.EmptyValues.v_DateTime:(DateTime)reader["NGAYCAPNHAT"];
//            _NGUOICAPNHAT = (reader["NGUOICAPNHAT"] is DBNull)?DalTools.EmptyValues.v_string:(string)reader["NGUOICAPNHAT"];
//            _ISDELETE = (reader["ISDELETE"] is DBNull)?DalTools.EmptyValues.v_bool:(bool)reader["ISDELETE"];
            }
            catch (Exception ex)
            {
                throw new DalException("Failed to read properties from DataReader.", ex);
            }
        } 
        */

        #endregion


        public void Fill(Int32 MANHANVIEN, Int32 MALOAI, string TENNHANVIEN, string CHUCVU, DateTime NGAYSINH, string GIOITINH, string CMND, string DIACHI, string QUEQUAN, string DIDONG, decimal LUONGCOBAN, string EMAIL, bool THEODOI, DateTime NGAYTAO, string NGUOITAO, DateTime NGAYCAPNHAT, string NGUOICAPNHAT, bool ISDELETE)
        {
                     this._MANHANVIEN = MANHANVIEN;
         this._MALOAI = MALOAI;
         this._TENNHANVIEN = TENNHANVIEN;
         this._CHUCVU = CHUCVU;
         this._NGAYSINH = NGAYSINH;
         this._GIOITINH = GIOITINH;
         this._CMND = CMND;
         this._DIACHI = DIACHI;
         this._QUEQUAN = QUEQUAN;
         this._DIDONG = DIDONG;
         this._LUONGCOBAN = LUONGCOBAN;
         this._EMAIL = EMAIL;
         this._THEODOI = THEODOI;
         this._NGAYTAO = NGAYTAO;
         this._NGUOITAO = NGUOITAO;
         this._NGAYCAPNHAT = NGAYCAPNHAT;
         this._NGUOICAPNHAT = NGUOICAPNHAT;
         this._ISDELETE = ISDELETE;
        }
    }
}